<html>
	<head>
		<script language="JavaScript" type="text/javascript">
			// Dojo configuration
			djConfig = {
				isDebug: true,
				dojoIframeHistoryUrl: "../../iframe_history.html" //for xdomain testing.
			};
		</script>
		<script language="JavaScript" type="text/javascript" 
			src="../../dojo.js"></script>
		<script language="JavaScript" type="text/javascript">
			dojo.require("dojo.io.*");
			dojo.require("dojo.io.IframeIO");

			var ctr = 0;
			var foo;

			function sendIt(){
				var bindArgs = {
					url: "IframeIOResponse.html",
					method: "get",
					mimetype: "text/html",
					transport: "IframeTransport",
					content: {
						increment: ctr++,
						fileFields: "ul1"
					},
					handler: function(type, data, evt){
						dojo.debug("Type:", type);
						dojo.debug("First H1 tag text:", data.getElementsByTagName("h1")[0].innerHTML);
						foo = evt; // to get at afterwards
					}
				};
				var request = dojo.io.bind(bindArgs);
			}
		</script>
	</head>
	<body>
		<input type="button" onclick="sendIt();" value="send it!">

		<p>
			Uses IframeTransport, but no form, just an URL parameter to dojo.io.bind().
			<b>Note:</b> It may not work for Safari from local disk, but it works when served from a web server.
		</p>
		<p>	
			Successful response should be something like <i>"This is a SUCCESSFUL HTML response for an IframeIO request."</i>
		</p>
	</body>
</html>
